home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / bin / ncursesw5-config < prev    next >
Encoding:
Text File  |  2009-02-12  |  4.9 KB  |  160 lines

  1. #!/bin/sh
  2. # $Id: ncurses-config.in,v 1.22 2009/01/24 21:06:45 tom Exp $
  3. ##############################################################################
  4. # Copyright (c) 2006-2007,2009 Free Software Foundation, Inc.                #
  5. #                                                                            #
  6. # Permission is hereby granted, free of charge, to any person obtaining a    #
  7. # copy of this software and associated documentation files (the "Software"), #
  8. # to deal in the Software without restriction, including without limitation  #
  9. # the rights to use, copy, modify, merge, publish, distribute, distribute    #
  10. # with modifications, sublicense, and/or sell copies of the Software, and to #
  11. # permit persons to whom the Software is furnished to do so, subject to the  #
  12. # following conditions:                                                      #
  13. #                                                                            #
  14. # The above copyright notice and this permission notice shall be included in #
  15. # all copies or substantial portions of the Software.                        #
  16. #                                                                            #
  17. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
  18. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
  19. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
  20. # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
  21. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
  22. # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
  23. # DEALINGS IN THE SOFTWARE.                                                  #
  24. #                                                                            #
  25. # Except as contained in this notice, the name(s) of the above copyright     #
  26. # holders shall not be used in advertising or otherwise to promote the sale, #
  27. # use or other dealings in this Software without prior written               #
  28. # authorization.                                                             #
  29. ##############################################################################
  30. #
  31. # Author: Thomas E. Dickey, 2006-on
  32.  
  33. prefix="/usr"
  34. exec_prefix="${prefix}"
  35.  
  36. bindir="${exec_prefix}/bin"
  37. includedir="${prefix}/include/ncursesw"
  38. libdir="${exec_prefix}/lib"
  39. datadir="${prefix}/share"
  40. mandir="${datadir}/man"
  41.  
  42. THIS="ncursesw"
  43.  
  44. LANG=C;        export LANG
  45. LANGUAGE=C;    export LANGUAGE
  46. LC_ALL=C;    export LC_ALL
  47. LC_CTYPE=C;    export LC_CTYPE
  48.  
  49. # with --disable-overwrite, we installed into a subdirectory, but transformed
  50. # the headers to include like this:
  51. #    <ncursesw/curses.h>
  52. if test xno = xno ; then
  53.     case $includedir in
  54.     $prefix/include/ncursesw)
  55.         includedir=`echo "$includedir" | sed -e 's,/[^/]*$,,'`
  56.         ;;
  57.     esac
  58. fi
  59.  
  60. test $# = 0 && exec /bin/sh $0 --error
  61.  
  62. while test $# -gt 0; do
  63.     case "$1" in
  64.     # basic configuration
  65.     --prefix)
  66.         echo "$prefix"
  67.         ;;
  68.     --exec-prefix)
  69.         echo "$exec_prefix"
  70.         ;;
  71.     # compile/link
  72.     --cflags)
  73.         INCS=
  74.         if test "${includedir}" != /usr/include ; then
  75.             INCS="-I${includedir}"
  76.         fi
  77.         if test "xno" = xno ; then
  78.             INCS="$INCS -I${includedir}/${THIS}"
  79.         fi
  80.         sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
  81.             $INCS
  82. ENDECHO
  83.         ;;
  84.     --libs)
  85.         sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
  86.             -L$libdir  -l${THIS} 
  87. ENDECHO
  88.         ;;
  89.     # identification
  90.     --version)
  91.         echo "5.7.20090207"
  92.         ;;
  93.     --abi-version)
  94.         echo "5"
  95.         ;;
  96.     --mouse-version)
  97.         echo "1"
  98.         ;;
  99.     # locations
  100.     --bindir)
  101.         echo "${bindir}"
  102.         ;;
  103.     --datadir)
  104.         echo "${datadir}"
  105.         ;;
  106.     --includedir)
  107.         echo "${includedir}"
  108.         ;;
  109.     --libdir)
  110.         echo "${libdir}"
  111.         ;;
  112.     --mandir)
  113.         echo "${mandir}"
  114.         ;;
  115.     --terminfo)
  116.         echo "/etc/terminfo"
  117.         ;;
  118.     --terminfo-dirs)
  119.         echo "/etc/terminfo:/lib/terminfo:/usr/share/terminfo"
  120.         ;;
  121.     --termpath)
  122.         echo ""
  123.         ;;
  124.     # general info
  125.     --help)
  126.         cat <<ENDHELP
  127. Usage: ${THIS}-config [options]
  128.  
  129. Options:
  130.   --prefix           echos the package-prefix of ${THIS}
  131.   --exec-prefix      echos the executable-prefix of ${THIS}
  132.  
  133.   --cflags           echos the C compiler flags needed to compile with ${THIS}
  134.   --libs             echos the libraries needed to link with ${THIS}
  135.  
  136.   --version          echos the release+patchdate version of ${THIS}
  137.   --abi-version      echos the ABI version of ${THIS}
  138.   --mouse-version    echos the mouse-interface version of ${THIS}
  139.  
  140.   --bindir           echos the directory containing ${THIS} programs
  141.   --datadir          echos the directory containing ${THIS} data
  142.   --includedir       echos the directory containing ${THIS} header files
  143.   --libdir           echos the directory containing ${THIS} libraries
  144.   --mandir           echos the directory containing ${THIS} manpages
  145.   --terminfo         echos the \$TERMINFO terminfo database path
  146.   --terminfo-dirs    echos the \$TERMINFO_DIRS directory list
  147.   --termpath         echos the \$TERMPATH termcap list
  148.  
  149.   --help             prints this message
  150. ENDHELP
  151.         ;;
  152.     --error|*)
  153.         /bin/sh $0 --help 1>&2
  154.         exit 1
  155.         ;;
  156.     esac
  157.     shift
  158. done
  159. # vile:shmode
  160.